<?php
echo '<script type="text/javascript">';
require APP . WEBROOT_DIR . DS . "js" . DS . "validate" . DS . "pricetypes_show_index.js";
echo '</script>';
?>
<div class="pricetypesShows index">
    <?php echo $this->Form->create('PricetypesShow'); ?>
    <h2><?php __('Configuración de Precios de Shows a Particulares'); ?></h2>
    
    <table cellpadding="0" cellspacing="0">
        <tr>
            <th>Tipo de Precio</th>
            <th>Costo 2 Personajes</th>
            <th>Costo Personaje Extra</th>
            <th>Pago a Empleado</th>
        </tr>
        <?php
        $i = 0;

        foreach ($pricetypes as $pricetype) {
            $class = null;
            if ($i++ % 2 == 0) {
                $class = ' class="altrow"';
            }
            ?> 
            <tr<?php echo $class; ?>>
                <td><?php echo $pricetype['Pricetype']['name'] ?></td>
                <td><?php echo $this->Form->input('general_client_cost_' . $pricetype['Pricetype']['id'], array('label' => false, 'div' => false, 'class' => 'validCost')); ?></td>
                <td><?php echo $this->Form->input('general_client_cost_extra_' . $pricetype['Pricetype']['id'], array('label' => false, 'div' => false, 'class' => 'validCost')); ?></td>
                <td><?php echo $this->Form->input('general_employee_cost_' . $pricetype['Pricetype']['id'], array('label' => false, 'div' => false, 'class' => 'validCost')); ?></td>
            </tr>
            <?php
        }
        ?>
    </table>
    <br />
    <br />
    <h2><?php __('Configuración de Precios de Shows a Peloteros'); ?></h2>
    <table cellpadding="0" cellspacing="0">
        <tr>
            <th>Pelotero</th>
            <th>Costo 2 Personajes</th>
            <th>Costo Personajes Extra</th>
            <th>Pago a Empleado</th>
        </tr>
        <?php
        $i = 0;

        foreach ($peloteros as $pelotero) {
            $class = null;
            if ($i++ % 2 == 0) {
                $class = ' class="altrow"';
            }
            ?> 
            <tr<?php echo $class; ?>>
                <td><?php echo $pelotero['Pelotero']['name'] ?></td>
                <td><?php echo $this->Form->input('pelotero_client_cost_' . $pelotero['Pelotero']['id'], array('label' => false, 'div' => false, 'class' => 'validCost')); ?></td>
                <td><?php echo $this->Form->input('pelotero_client_cost_extra_' . $pelotero['Pelotero']['id'], array('label' => false, 'div' => false, 'class' => 'validCost')); ?></td>
                <td><?php echo $this->Form->input('pelotero_employee_cost_' . $pelotero['Pelotero']['id'], array('label' => false, 'div' => false, 'class' => 'validCost')); ?></td>
            </tr>
            <?php
        }
        ?>
    </table>
    <?php echo $this->Form->end(__('Guardar', true)); ?>
</div>